package april.test_4_11;

import java.util.Scanner;

public class TestMain2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        int k = scanner.nextInt();
        int count = 0;
        int left = k - count;
        int right = k - count;
        int tmp = 0;
        while (m >= 0) {
            if(left == 0) {
                left = 0;
                tmp += k;
            } else {
                left = k - count;
                tmp += (k - left);
            }
            if (right == n - 1) {
                right = n - 1;
                tmp += k;
            } else {
                right = k + count;
                tmp += (right - k);
            }
            tmp += 1;
            count++;
            m -= tmp;
        }
        System.out.println(count);
    }
}
